package com.yesorno.model;

import org.json.JSONObject;

/**
 * http请求的返回对象，有state和resContent属性，其中<br/>
 * <font color="red">code-{0:正常，其它为各种异常}，默认为0</font><br/>
 * <font color="red">msg-返回的消息</font><br/>
 * <font color="red">result-返回的结果集</font><br/>
 * 
 * @author samoin
 * @date 2011-07-07
 * @version 0.1
 * 
 */
public class HttpResponseObject {

	private int code = 0;// 请求的返回状态
	private String messages = "";// 请求的返回消息
	private JSONObject result;// 请求返回的结果集

	public String getMessages() {
		return messages;
	}

	public void setMessages(String messages) {
		this.messages = messages;
	}

	public JSONObject getResult() {
		return result;
	}

	public void setResult(JSONObject result) {
		this.result = result;
	}

	public HttpResponseObject() {
		super();
	}

	@Override
	public String toString() {
		return "{code:" + code + ",messages:\"" + messages + "\",result:\""
				+ result.toString() + "\"}";
	}

	public int getCode() {
		return code;
	}

	public void setCode(int code) {
		this.code = code;
	}

}
